package com.dys.testqueue16;

/**
 * @className: com.dys.testqueue16.Student
 * @description: com.dys.testqueue16
 * @author: pine cone
 * @version: v1.0.0
 * @createTime: 2024/08/12 下午11:13
 */
public class Student implements Comparable<Student> {
    private String name;
    private int age;

    public Student(String name, int age) {
        this.name = name;
        this.age = age;
    }

    @Override
    public String toString() {
        return "Student{" +
                "name='" + name + '\'' +
                ", age=" + age +
                '}';
    }

    @Override
    public int compareTo(Student o) {
        return this.age - o.age;
    }
}
